package com.cosmocoder.monopoly.dao;

import java.util.Collection;

import com.cosmocoder.monopoly.domain.Room;
import com.cosmocoder.persistence.Dao;

/**
 * Data Access Object for Monopoly Rooms.
 * @author Rodrigo Mallmann Guerra
 */
public interface RoomDao extends Dao<Room, Long>{
	public Collection<Room> getByName(String name);
	
	/** 
	 * Persist room on database
	 * It does not persist changes on themes.
	 */
	public Room makePersistent(Room entity);
	
	/** 
	 * Delete room from database
	 * Orphan players are also deleted 
	 * */
	public Room makeTransient(Room entity);
}
